<template>
  <div>zi￥{{ money }}</div>
  <button @click="buy">buy</button>
</template>

<script setup>
const props = defineProps({
  message: String,
  money: Number
})

const emit = defineEmits(['changeMoney'])

console.log(props.message)
console.log(props.money)

const buy = () => {
  emit('changeMoney', props.money - 100)
}
</script>

<style lang="scss" scoped></style>
